
var form_room = "";
form_room += "<table>";

for (var j = ${fld:start_layer_no}; j <= ${fld:end_layer_no}; j++)
{
	form_room += "<tr>";
	for (var i = ${fld:start_unit_no}; i <= ${fld:end_unit_no}; i++)
	{
		var ii = i
		//if(i<10)
		  ii = '-'+ii;
		  
		form_room += "<td>";
		form_room += "<input type='hidden' id='room_num' name='room_num' size='10' value='"+j+ii+"' >";
		form_room += "<input type='text' id='house_name' name='house_name' value='${fld:serial_no}-${fld:unit_no}-"+j+ii+"' >";
		form_room += "<input type='hidden' id='layer_no' name='layer_no' size='10' value='"+j+"' >";

		/*判断是否为顶层*/
		if(j==${fld:max_layer_no})
			form_room += "<input type='hidden' id='is_top_layer' name='is_top_layer' size='10' value='1' >";
		else
			form_room += "<input type='hidden' id='is_top_layer' name='is_top_layer' size='10' value='0' >";

		form_room += "</td>";
	}
	form_room += "</tr>";
}
form_room += "</table>";

document.getElementById("form_room_list").innerHTML = form_room;
